/**
* 文件内容：CSV 文件保存
  作者：           张聪
*/

#pragma once

#include <stdint.h>
#include <string>
#include <vector>

namespace SensorDataInfo {

enum chanType {
    CHAN_ACCX,
    CHAN_ACCY,
    CHAN_ACCZ,
    CHAN_SPEEDX,
    CHAN_SPEEDY,
    CHAN_SPEEDZ,
    CHAN_MOVEX,
    CHAN_MOVEY,
    CHAN_MOVEZ,
};

struct figureInfo {
    std::vector<float>  rawValue;
    float     maxValue;
    float     minValue;
    float     peakValue;
    float     averageValue;
    float     absAverageValue;
    float     variance;
    float     standardDeviation;
    float     kurtosis;
    float     margin;
    float     waveFactor;
    float     peakFactor;
    float     pulseFactor;
    float     mainFrequency;
    float     mainAmp;
};

struct  CommonSensor {
    int64_t     recvtime;
    int64_t     timestamp;
    char      calendartime[128];
    char      hourtime[128];
    float     rotationSpeed;
    float     power;
    float     windSpeed;
    float     yaw;
    uint64_t mccAddr;
    uint32_t cpuID;
    uint32_t devChan;
    figureInfo  accX;
    figureInfo  accY;
    figureInfo  accZ;
    figureInfo   speedX;
    figureInfo   speedY;
    figureInfo   speedZ;
    figureInfo   moveX;
    figureInfo   moveY;
    figureInfo   moveZ;
};
}